package com.filetransfer.utils;
import com.formdev.flatlaf.extras.FlatSVGIcon;

import javax.swing.*;
import java.awt.*;
public class SvgIconUtil {
    public static FlatSVGIcon createSvgIcon(String svgFilePath, int width, int height) {
        FlatSVGIcon svgIcon = new FlatSVGIcon(svgFilePath, width, height);
        svgIcon.setColorFilter(new FlatSVGIcon.ColorFilter() {
            @Override
            public Color filter(Color color) {
                return UIManager.getColor("Label.foreground");
            }
        });
        return svgIcon;
    }
}
